package day12;

import java.io.File;
import java.io.IOException;

public class FileDemo03 {
    public static void main(String[] args) throws IOException {
        //在当前模块创建java.txt文件
        File f1=new File("study\\src\\java.txt");
        System.out.println(f1.createNewFile());
        //删除java.txt
        System.out.println(f1.delete());
        System.out.println("------------");
        //在当前模块目录下创建itcast目录
        File f2=new File("study\\src\\itcase");
        System.out.println(f2.mkdir());
        //删除itcast
        System.out.println(f2.delete());
        System.out.println("------------");
        //创建一个目录itcast，然后再在该目录下创建一个java.txt
        File f3=new File("study\\src\\itcase");
        System.out.println(f3.mkdir());
        File f4=new File("study\\src\\itcase\\java.txt");
        System.out.println(f4.createNewFile());

        System.out.println(f4.delete());
        System.out.println(f3.delete());


    }
}
